/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chatlink;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

/**
 *
 * @author Nguyen Van Thoi
 */
public class ChatPrivate extends MyEvent{
    private JFrame _jChatPrivate;
    private JPanel _jPanel;
    private JTextArea _jtxtChatContent, _jtxtMessage;
    private JScrollPane _jscrollChatContent, _jscrollMessage;
    private JButton _jbtnSend;

    public ChatPrivate(String user) {
       _jChatPrivate = new JFrame(user);
       _jPanel = new JPanel();
       
       _jtxtChatContent = new JTextArea(20,  42);
       _jtxtChatContent.setEditable(false);
       _jtxtChatContent.setLineWrap(true);
       
       _jtxtMessage = new JTextArea(5, 34);
       _jtxtMessage.setLineWrap(true);
       _jscrollChatContent = new JScrollPane(_jtxtChatContent);
       _jscrollMessage = new JScrollPane(_jtxtMessage);
       
       _jbtnSend = new JButton("Send");
       _jbtnSend.setPreferredSize(new Dimension(80, 80));
       _jbtnSend.addActionListener(this);
    }
    
    void CreateGUI() {
        _jPanel.add(_jscrollChatContent);
        _jPanel.add(_jscrollMessage);
        _jPanel.add(_jbtnSend);
        _jChatPrivate.add(_jPanel);
        _jChatPrivate.setSize(500, 462);
        _jChatPrivate.setVisible(true);
        _jChatPrivate.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if(e.getSource().equals(_jbtnSend)){
            
        }
    }
    
}
